<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 200px;
            height: 20px;
            text-align: center;
            line-height: 20px;
            padding: 20px;
            background-color: #f00;
            position: fixed;
            right: 0;
            bottom: 100px;

            display: none;
        }
    </style>
</head>

<body>

    <div>客服小千QQ:28999999</div>

    <script>

        // 简易版客服：一开始是隐藏的，过了5s以后，就出现


        setTimeout(function () {
            var oDiv = document.querySelector('div');
            oDiv.style.display = 'block';


            // 每隔1s换个位置

            setInterval(function () {
                var x = parseInt(Math.random() * 1000);
                var y = parseInt(Math.random() * 500);
                oDiv.style.left = x + 'px';
                oDiv.style.top = y + 'px';
            }, 1000)




        }, 2000)



    </script>

</body>

</html>